{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "ename": "ModuleNotFoundError",
     "evalue": "No module named 'geostat'",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mModuleNotFoundError\u001b[0m                       Traceback (most recent call last)",
      "\u001b[1;32m<ipython-input-1-55ba1f73e0c7>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[0;32m      1\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[0mnumpy\u001b[0m \u001b[1;32mas\u001b[0m \u001b[0mnp\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m      2\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[0mmatplotlib\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mpyplot\u001b[0m \u001b[1;32mas\u001b[0m \u001b[0mplt\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 3\u001b[1;33m \u001b[1;32mimport\u001b[0m \u001b[0mgeostat\u001b[0m \u001b[1;32mas\u001b[0m \u001b[0mgeo\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m      4\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[0mpandas\u001b[0m \u001b[1;32mas\u001b[0m \u001b[0mpd\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;31mModuleNotFoundError\u001b[0m: No module named 'geostat'"
     ]
    }
   ],
   "source": [
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "import geostat as geo\n",
    "import pandas as pd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[[     nan      nan      nan ...,      nan      nan      nan]\n",
      " [ 20.32     0.      84.46   ..., -26.7309 -26.4616 -26.5061]\n",
      " [ 21.59     0.      84.46   ..., -26.7147 -26.5093 -26.5425]\n",
      " ..., \n",
      " [ 80.01     0.      22.23   ..., -26.8609 -26.2348 -26.1006]\n",
      " [ 81.28     0.      22.23   ..., -26.384  -26.2274 -26.0645]\n",
      " [ 82.55     0.      22.23   ..., -26.4432 -26.0196 -26.052 ]]\n"
     ]
    },
    {
     "ename": "IndexError",
     "evalue": "index 1 is out of bounds for axis 1 with size 1",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mIndexError\u001b[0m                                Traceback (most recent call last)",
      "\u001b[1;32m<ipython-input-2-f5b4f58187fd>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[0;32m      8\u001b[0m \u001b[0mn\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mlen\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mv\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m      9\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m---> 10\u001b[1;33m \u001b[0mxx\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0myy\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mvv\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mnp\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mcopy\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mx\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;36m0\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mnp\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mcopy\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mx\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;36m1\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mnp\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mcopy\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mv\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m     11\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m     12\u001b[0m \u001b[0mxx\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mshape\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;33m(\u001b[0m\u001b[1;36m50\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;36m50\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;31mIndexError\u001b[0m: index 1 is out of bounds for axis 1 with size 1"
     ]
    }
   ],
   "source": [
    "mydata = np.genfromtxt('../data/massilon-face2-universal_cord.csv', delimiter=',')\n",
    "#mydata = np.genfromtxt('../data/massilon-face6-universal_cord.txt',  delimiter=' ', skip_header=4)\n",
    "\n",
    "mydata = np.array( mydata )\n",
    "print(mydata)\n",
    "x = mydata[1:,0:1]\n",
    "v = mydata[1:,5]\n",
    "n = len(v)\n",
    "\n",
    "xx,yy,vv = np.copy(x[:,0]), np.copy(x[:,1]), np.copy(v)\n",
    "\n",
    "xx.shape = (50,50)\n",
    "yy.shape = (50,50)\n",
    "vv.shape = (50,50)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 95,
   "metadata": {
    "collapsed": true,
    "jupyter": {
     "outputs_hidden": true
    }
   },
   "outputs": [],
   "source": [
    "d = pd.read_excel('../data/massilon-face6-universal_cord.xlsx')\n",
    "#d.head()\n",
    "x = np.array( [d.X,d.Y]).transpose()\n",
    "v = d.k3\n",
    "n = len(v)\n",
    "\n",
    "xx,yy,vv = np.copy(d.X), np.copy(d.Y), np.copy(v)\n",
    "\n",
    "xx.shape = (50,50)\n",
    "yy.shape = (50,50)\n",
    "vv.shape = (50,50)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 102,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYYAAAD8CAYAAABzTgP2AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4wLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvpW3flQAAD4BJREFUeJzt23+s3XV9x/Hny96BAzegULS2dBdD\no9Ztgp4UnW5hKlA2tWZjWdmWNRum/8xMdGbDmQVFTWBxgy3+SBp0acwmOKax0ThWQZLFGOQWWBSx\na0W0VxjUFDHMDNf53h/nW7yf6yn3xzntvad9PpLmnu/3fHq+7297Tp8933NvqgpJkg571lIPIEla\nXgyDJKlhGCRJDcMgSWoYBklSwzBIkhqGQZLUMAySpIZhkCQ1JpZ6gMU466yzanJycqnHkKSxsnv3\n7u9V1aq51o1lGCYnJ5mamlrqMSRprCT59nzWeSlJktQwDJKkhmGQJDUMgySpYRgkSQ3DIElqGAZJ\nUsMwSJIahkGS1DAMkqSGYZAkNQyDJKlhGCRJDcMgSWoYBklSwzBIkhqGQZLUMAySpIZhkCQ1DIMk\nqWEYJEkNwyBJahgGSVLDMEiSGiMJQ5JNSfYk2Zfk6gH3n5zklu7+u5JMzrp/XZInk7xjFPNIkhZv\n6DAkWQF8CLgM2ABckWTDrGVXAo9X1XnADcD1s+6/Afj8sLNIkoY3incMG4F9VfVgVf0IuBnYPGvN\nZmBHd/tW4LVJApDkTcCDwP0jmEWSNKRRhGENsH/G9nS3b+CaqjoEPAGcmeRU4C+A94xgDknSCIwi\nDBmwr+a55j3ADVX15JwHSbYlmUoydeDAgUWMKUmaj4k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Zbp6+G4DEOSAB8FHqiqv51x105ga3d7K/3P\nHpalJKuSnN7d/ln6T6wHgC8Cl3fLlu05VNU7q2ptVU3Sf/t/R1X9PmMy/2FJTk3yc4dv07/G/TXG\n5LlUVf8F7E/ywm7Xa4GvMybzz3IFP7mMBON1Dt8BXpHklO7fp8N/D8vy9XBc/oBbklcD/w58lZ9c\n3/5L+p8zfBJYR/8v6neq6uCSDDmHJL8M7KD/3QvPAj5ZVdcmeQH9/4GvBO4F/qCqnlq6SeeW5CLg\nHVX1+nGbv5v3093mBPBPVfX+JGcyPs+l84GbgJOAB4E/ontOMQbzAyQ5hf6Hty+oqie6fWPzdwDQ\nfcv579L/rsl7gTfT/0xh2b0ejsswSJIW77i8lCRJWjzDIElqGAZJUsMwSJIahkGS1DAMkqSGYZAk\nNQyDJKnx/2g25U/O3yboAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x2ae818e2c88>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.plot(x[:,0],x[:,1],'.')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 93,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAWQAAADuCAYAAAAOR30qAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4wLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvpW3flQAAA6ZJREFUeJzt2LFtQlEQRcH/LJcAsX//tUARxHYP\n64ACAEuIIzwT32CjE+yamQ2A1/t49QEAXAkyQIQgA0QIMkCEIANECDJAhCADRAgyQIQgA0R8PjI+\nHA6z7/uTTgF4T+fz+Wdmjrd2DwV53/ftdDr9/SqAf2itdbln52UBECHIABGCDBAhyAARggwQIcgA\nEYIMECHIABGCDBAhyAARggwQIcgAEYIMECHIABGCDBAhyAARggwQIcgAEYIMECHIABGCDBAhyAAR\nggwQIcgAEYIMECHIABGCDBAhyAARggwQIcgAEYIMECHIABGCDBAhyAARggwQIcgAEYIMECHIABGC\nDBAhyAARggwQIcgAEYIMECHIABGCDBAhyAARggwQIcgAEYIMECHIABGCDBAhyAARggwQIcgAEYIM\nECHIABGCDBAhyAARggwQIcgAEYIMECHIABGCDBAhyAARggwQIcgAEYIMECHIABGCDBAhyAARggwQ\nIcgAEYIMECHIABGCDBAhyAARggwQIcgAEYIMECHIABGCDBAhyAARggwQIcgAEYIMECHIABGCDBAh\nyAARggwQIcgAEYIMECHIABGCDBAhyAARggwQIcgAEYIMECHIABGCDBAhyAARggwQIcgAEYIMECHI\nABGCDBAhyAARggwQIcgAEYIMECHIABGCDBAhyAARggwQIcgAEYIMECHIABGCDBAhyAARggwQIcgA\nEYIMECHIABGCDBAhyAARggwQIcgAEYIMECHIABGCDBAhyAARggwQIcgAEYIMECHIABGCDBAhyAAR\nggwQIcgAEYIMECHIABGCDBAhyAARggwQIcgAEYIMECHIABGCDBAhyAARggwQIcgAEYIMECHIABGC\nDBAhyAARggwQIcgAEYIMECHIABGCDBAhyAARggwQIcgAEYIMECHIABGCDBAhyAARggwQIcgAEYIM\nECHIABGCDBAhyAARggwQIcgAEYIMECHIABGCDBAhyAARggwQIcgAEYIMECHIABGCDBAhyAARggwQ\nIcgAEYIMECHIABGCDBAhyAARggwQIcgAEYIMECHIABGCDBAhyAARggwQIcgAEYIMECHIABGCDBAh\nyAARggwQIcgAEYIMECHIABGCDBAhyAARggwQIcgAEYIMECHIABGCDBAhyAARggwQsWbm/vFa39u2\nXZ53DsBb+pqZ463RQ0EG4Hm8LAAiBBkgQpABIgQZIEKQASIEGSBCkAEiBBkgQpABIn4BNBAbfWQT\nQrsAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x2aefdf0eba8>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "fig = plt.pcolormesh(xx,yy,vv)\n",
    "\n",
    "#fig.axes.get_xaxis().set_visible(False)\n",
    "#fig.axes.get_yaxis().set_visible(False)\n",
    "\n",
    "#plt.savefig('tmp.png',pad_inches='tight')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAEJCAYAAACT/UyFAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4wLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvpW3flQAAD+hJREFUeJzt3W+MXFd9xvHvA5ioalAJtZO6jstS\n5IoGtZiwStNGqlJFbUIiYWhJ5bwIBqUyakMLEn1heNEgpEipWkCiLUFGiTBVSggQiktMaDBIgRcE\nNlEIDm6KC4YstuIFShJEReXw64u5JlMzzs7On/13vh9ptXfO3Hvnd8bXz9w9c+dMqgpJUjuetdIF\nSJKWl8EvSY0x+CWpMQa/JDXG4Jekxhj8ktQYg1+SGmPwS1JjDH5JasxzVroAgI0bN9bMzMxKlyFJ\na8r999//varatNTtVkXwz8zMMDc3t9JlSNKakuTbo2znUI8kNcbgl6TGGPyS1BiDX5IaY/BLUmMM\nfklqjMEvSY0x+CWpMQa/JDVmVXxyVz0ze+4aar2jN1015UokrWee8UtSYwx+SWqMwS9JjTH4Jakx\nBr8kNcbgl6TGGPyS1BiDX5IaY/BLUmMMfklqzKLBn2Rrks8nOZzk4SRv7trfkeS7SR7sfq7s2+Zt\nSY4keSTJ5dPsgCRpaYaZq+ck8NaqeiDJ84D7k9zT3feeqvr7/pWTXADsBF4K/Crw2SS/UVVPTbJw\nSdJoFj3jr6rjVfVAt/wkcBjY8gyb7ABur6qfVNW3gCPARZMoVpI0viWN8SeZAV4O3Nc1vSnJQ0lu\nTXJO17YFeLR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7wTmqmo/vSfln5McoXemv3Pl\nKp6sIfv/V0leBZyk1//Xr1jBU5Dkw/SuWtiYZB64AdgAUFXvp/fp8CuBI8CPgTesTKXTMUT/Xwv8\neZKTwP8AO9fRiQ/AJcC1wNeSPNi1vR34NWjiGBim/0s+BvzkriQ1ZrUP9UiSJszgl6TGGPyS1BiD\nX5IaY/BL0ogWm0RvhP3dneSHST51Wvtt3WSNh7rH3DDO4xj8kjS6DwJXTHB/f0fv8s3T3Qa8BPgt\n4BeAsWbhNfglaUSDJtFL8uLuzP3+JF9I8pIl7O8g8OSA9gPdJHQFfJnep5NHZvBL0mTtBf6yql4B\n/DXwvkntuBviuRa4e5z9rOpP7krSWtJNpvZ7wEf7Zoc/q7vvj4F3Dtjsu1V1+ZAP8T7g3qr6wjh1\nGvySNDnPAn5YVdtPv6ObYG3QJHNDSXIDsAl44+jl9TjUI0kT0k2Z/K0kV8PPvhbyZePuN72vVL0c\nuKaqfjr2/pyrR5JG0z+JHvAYvUn0PgfcTO9rEzcAt1fVoCGeQfv7Ar2rd86mN8PmdVX1mW4Ctm/z\n9Bu/dw67z4GPY/BLUlsc6pGkxhj8ktQYg1+SGmPwS1JjDH5JaozBL0mNMfglqTEGvyQ15v8AVYxT\nHe12KHwAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x2aefc4c44e0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.hist(v,30)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {
    "collapsed": true,
    "jupyter": {
     "outputs_hidden": true
    }
   },
   "outputs": [],
   "source": [
    "\n",
    "vario = geo.ExperimentalVariogram(x, v)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\gehrenard\\Anaconda3\\lib\\site-packages\\numpy\\core\\fromnumeric.py:2909: RuntimeWarning: Mean of empty slice.\n",
      "  out=out, **kwargs)\n",
      "C:\\Users\\gehrenard\\Anaconda3\\lib\\site-packages\\numpy\\core\\_methods.py:80: RuntimeWarning: invalid value encountered in double_scalars\n",
      "  ret = ret.dtype.type(ret / rcount)\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAEDCAYAAADOc0QpAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4wLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvpW3flQAAF6BJREFUeJzt3X+QXeV52PHvYyJgwzreGlwZLSTC\nKSH2oBasLWZQx7NymoBpxlCVTEhbxnTs0dg1bdxiF0gLiT3DSKnHTtM6sUeOMXbqsmkCqBSYUA/S\nDvYkToyQDJIpFtjuRCvV2FCB1wgbzNM/7ll0tazuPcs9e++5534/M3d0f7x79exBPHv2eZ77nshM\nJEnN8ppBByBJqp7JXZIayOQuSQ1kcpekBjK5S1IDmdwlqYEGmtwj4paIeDIi9lbwXudFxF9GxL6I\neDgifr3ttVsj4tsRsae4ndfr3ydJdRaDnHOPiLcD88AXMvPcHt/rF4DMzP0RsQbYBbw5Mw9HxK3A\n3Zn5Zz0HLUlDYKBn7pn5APB0+3MR8fMR8ecRsSsivhwRv1jyvb6ZmfuL+weBJ4E3VB60JA2BOtbc\ntwH/KjPXAx8C/nC5bxARFwAnAk+0PX1zUa75vYg4qZpQJameBlqWAYiItbRKJudGxDjwPeCxtiUn\nZeabI2IT8NEl3mIuMy9ue7/TgVng3Zn51bbn/i+thL8NeCIzl3ovSWqEnxp0AIu8Bjicma9oeGbm\nHcAdnb44In4GuAf4DwuJvfjaQ8XdH0XE52j9RiBJjVWrskxmPgt8OyJ+DSBa/l6Zr42IE4E7aTVn\n/3TRa6cvvB9wOdDzdI4k1dmgp2VuA6aB04DvAr8N7A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pekBjK5S1IDmdwlqYFM7pLUQCZ3SWqg/w9veGo0z524zgAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x2aefdf1a4a8>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "he,ve = vario(hmax=40,lag=1)\n",
    "\n",
    "plt.plot(he,ve,'o')\n",
    "plt.grid()\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAWQAAADuCAYAAAAOR30qAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4wLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvpW3flQAAIABJREFUeJztnVmOJFl6nX8b3WPKqTKrxa5WF6UG\nRIIiAWkDWoY2oXVoDVqQ3vTQIECAECh0NxuoMeeI8NkmPSQgRlH3fBVuGRF5q+p8j3HTBjczv255\n/vufU0zTFMYYYz495ac+AWOMMR/whGyMMZngCdkYYzLBE7IxxmSCJ2RjjMkET8jGGJMJnpCNMSYT\nPCEbY0wmeEI2xphMqI/5x9XF2VS/eJLeUT3K7YrQ3YCLatDHK9L7bAq9DVEW+jyGqZBjy7KTY6PY\nroVzLMXnioiYQp/HMOnfzwF+Ww9j+jYfpmrWsbpRbzeO+vz7AX7/B7Ed7G82c3c5o6kVHrmAx4CP\nBWOleuzgWHQeBXXyzmzyLcY5G8L3otVjY6P3OC71eZyf7JN/f1av5TZt0cuxf/yH7vU0TS/02Xzg\nqAm5fvEkvvjv/y059vzpSm7X1vpEv7x4J8eeNZvk31+013Ib4rRKX+SIiNWwlGP/YfmdHNuJO/5F\n81Zuc1Hu5Fg36VvyZjiTY+txIcf+tP88+fdv9o/lNpfdiRz7dv1In8ehlWNv3p/LsfE6fR2rlZ78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pQ65d3+xjP03r1BEbnZOpDuqLS\nw6ZC68GYNgwJusMCzJFg+ewg1jyffdfH9nl6nyev++hEEjEZGZV7veBSGthERLVLC3PlahfjWfpe\nl+t9DI9PkmNoFgXPgdKkI7QxfL3uoj9Pf+561cXhWfp5JE20oXW8YO6k1npPizbK63Ra+HixiFIE\nNGBN43iPMWRsyigP6c82tqXUg/G7C5BePYna1tAW0ti+XxayllDB2ut6J4duzad9Q6bCCzSaPCRU\nuOCH/OFY/xv9hVIT9UOjflwjQk7UD01/pn+E1ET90FBTjpqoHxr6wVYT9UPDE6s1ZGOM+cXjCdkY\nYzLBE7IxxmTC8eZCjdDSKBWkhUXup3pMJ+iSxgMGQtSQQcZDULxT2/VL2B9cdSrqqYXsP8YozGgq\n8Aiqdvq3ugIdsFpAoZA0d7FLTFjG9GV9KALTYcT5U9I5JpdQCjdQHHTTTiW+G/Q9q+g6Un/NnPTr\nCPkVxcYtSuCZmYai0rbHupAa89xk7NviN2RjjLmBG0OMMcZ4QjbGmFw4TkMuC20oX4NJ0BmsQV1A\nqrAwESI9aQDz7gH0zQ7SaZUevHw/xvaFMFa/hzBHMjZR5kjNWn+2AZb/lqCB11sYg3tTb9IiW9WN\nUs8jRrifVBMgKpWIPGkNmZpQ8JVnCwZOdD06sd1yEaH0ZUjoJkgXHeAZGUTTUbMaZNMUrflHLXum\nwX4hdO7+BPRqOJG7kDr8hvwR7J7kf/m6s099Bj8O/Yjmwk8iLXmXR2MI0Z3Pc2p8SOqtNWRjjPnF\n4wnZGGMywROyMcZkQjFhk8W/+sdF8Soi/nx/p2OMMT9Lvpym6cWP/aOjJmRjjDH3hyULY4zJBE/I\nxhiTCZ6QjTEmEzwhG2NMJnhCNsaYTPCEbIwxmeAJ2RhjMsETsjHGZIInZGOMyYT/C8fuJwVUNmYT\nAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x2aefdf76080>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true,
    "jupyter": {
     "outputs_hidden": true
    }
   },
   "outputs": [],
   "source": [
    "i = np.random.randint(0,2500,100)\n",
    "plt.scatter(d.X[i],d.Y[i],20,c=v[i])\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true,
    "jupyter": {
     "outputs_hidden": true
    }
   },
   "outputs": [],
   "source": [
    "X = np.array([d.X[i],d.Y[i]]).transpose()\n",
    "expvario = geo.ExperimentalVariogram(X, v[i])\n",
    "print(X.shape)\n",
    "he,ge = expvario(hmax=60.0,lag=2)\n",
    "\n",
    "# Defines a variogram model: adapt the range, sill and type\n",
    "#variomod = geo.variogram( 0.5, 8600, typ='linear' , nugget=0.1)\n",
    "#variomod = geo.variogram( 0.4, 900, typ='spherical' , nugget=0.1)\n",
    "\n",
    "variomod1 = geo.Variogram( 10, 0.15, typ='exponential' , nugget=0)\n",
    "variomod2 = geo.Variogram( 40, 0.10, typ='gaussian' , nugget=0)\n",
    "\n",
    "# Superposes the plot of the two curves for manual fitting\n",
    "hplot = np.arange(0,60,0.01)\n",
    "\n",
    "plt.figure(figsize=(7,5))\n",
    "plt.plot(he,ge,'o',label='data')\n",
    "plt.plot(hplot,variomod1(hplot)+variomod2(hplot),label='model')\n",
    "plt.grid()\n",
    "plt.legend()\n",
    "plt.title('Variogram')\n",
    "plt.xlabel('h')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\gehrenard\\Anaconda3\\lib\\site-packages\\matplotlib\\cbook\\deprecation.py:106: MatplotlibDeprecationWarning: Adding an axes using the same arguments as a previous axes currently reuses the earlier instance.  In a future version, a new instance will always be created and returned.  Meanwhile, this warning can be suppressed, and the future behavior ensured, by passing a unique label to each axes instance.\n",
      "  warnings.warn(message, mplDeprecation, stacklevel=1)\n"
     ]
    },
    {
     "ename": "NameError",
     "evalue": "name 'n' is not defined",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mNameError\u001b[0m                                 Traceback (most recent call last)",
      "\u001b[1;32m<ipython-input-28-4b9589470a27>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[0;32m      6\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m      7\u001b[0m \u001b[0mplt\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0msubplot\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;36m222\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 8\u001b[1;33m \u001b[0mv\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mshape\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mn\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m      9\u001b[0m \u001b[0ms\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mv\u001b[0m\u001b[1;33m-\u001b[0m\u001b[0mnp\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mmin\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mv\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m     10\u001b[0m \u001b[0mplt\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mscatter\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mx\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;36m0\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mx\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;36m1\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0ms\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0ms\u001b[0m\u001b[1;33m*\u001b[0m\u001b[1;36m10\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mc\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mv\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0malpha\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;36m0.5\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;31mNameError\u001b[0m: name 'n' is not defined"
     ]
    }
   ],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true,
    "jupyter": {
     "outputs_hidden": true
    }
   },
   "outputs": [],
   "source": [
    "print(np.sqrt(2500))\n",
    "\n",
    "\n",
    "plt.subplot(221)\n",
    "plt.hist(v, density=True, cumulative=False, histtype='bar')\n",
    "plt.xlabel('Z')\n",
    "plt.title('Histogram')\n",
    "\n",
    "plt.subplot(222)\n",
    "v.shape=(n,)\n",
    "s = v-np.min(v)\n",
    "plt.scatter(x[:,0], x[:,1], s=s*10, c=v, alpha=0.5)\n",
    "plt.title('Map of measured Z(x)')\n",
    "\n",
    "plt.xlabel('x')\n",
    "plt.ylabel('y')\n",
    "plt.colorbar()\n",
    "plt.show()"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
